Custom functions

 

Function Description
ACQUISITIONCOST

Assigns an acquisition cost to the specified date.

  • arg1: acquisition cost
  • arg2: year
  • arg3: month
ACQUISITIONCOSTBYOFFSET

Assigns an acquisition cost to the start date plus an offset (number of periods).

  • arg1: acquisition cost
  • arg2: offset
AVERAGEVALUEPERDAY

Calculates the average value per day for the given periodic variable and the number of months.

  • arg1: periodic variable
  • arg2: number of months
BEFOREPROJECTSTART

Returns arg1 for periods before project start, and arg2 for other periods.

  • arg1: value for before project start
  • arg2: value for other periods
CUMULATIVE

Gets the cumulative periodic values of the given periodic variable.

  • arg1: periodic variable
CUMULATIVERANGE

Calculates the cumulative range value of a periodic variable.

  • arg1: periodic variable
  • arg2: range start offset
  • arg3: range end offset
DATEINPERIOD

Returns true if arg1 is within the current period. This must be used within another periodic function that will return an integer or double.

  • arg1 : an expression that can be resolved to a date
DAYSINPERIOD

Returns an array with the number of days for each given period.

  • arg1: 1 = Make all months equal; 0 = Account for days in each month
DAYSINRANGE

Returns an array with the number of days in each period, within the date range of arg1 to arg2.

  • arg1: an expression that can be resolved to a date
  • arg2: an expression that can be resolved to a date
  • arg3: 1 = Make all months equal; 0 = Account for days in each month
DISCOUNTEDVALUE

Gets the periodic discounted values of the given periodic variable by the given discount rate.

  • arg1: periodic variable
  • arg2: discount rate
FIRSTNONZEROYEAR

Calculates the year of the first non-zero value of a periodic variable.

  • arg1: periodic variable
FIRSTNONZEROYEARMONTH

Calculates the year and month of the first non-zero value of a periodic variable.

  • arg1: periodic variable
LASTNONZEROYEAR

Calculates the year of the last non-zero value of a periodic variable - for example, the final year of a project's production. Returns a set of integer values in the Projects View.

  • arg1: periodic variable
LASTNONZEROYEARMONTH

Calculates the year and month of the last non-zero value of a periodic variable. Returns a set of integer values in the Projects View.

  • arg1: periodic variable
MINDISCACCUMULATEDVALUE

Finds out the minimum discounted accumulated value of a periodic variable.

  • arg1: periodic variable
  • arg2: discount rate
NPV

Calculates the net present value of a periodic variable.

  • arg1: periodic variable
  • arg2: discount rate
PERIODINDEX

Returns the index of each period of the given periodic variable. The period index is relative to the portfolio start year and depends on the selected periodicity.

  • arg1: periodic variable
PERIODMONTH

Returns the number of the last month in each period of the given periodic variable. For example, 2010M1 is 1, 2001Q1 is 3, 2001Q2 is 6.

  • arg1: periodic variable
PERIODYEAR

Returns the year of each period of the given periodic variable.

  • arg1: periodic variable
PERIODICREMAININGNPV

Gets the periodic remaining NPV values of the given periodic variable by the given discount rate.

  • arg1: periodic variable
  • arg2: discount rate
POSACCUMFIRSTYEAR

Finds out the first year when the given variable has the positive accumulated value. Returns zero if the cumulative value never reaches positive value.

  • arg1: periodic variable
POSDISCACCUMFIRSTYEAR

Finds out the first year when the given variable has the positive discounted accumulated value. Returns zero if the cumulative value never reaches positive value.

  • arg1: periodic variable
  • arg2: discount rate
RANGE

Calculates the total value of a periodic variable for the given range.

  • arg1: periodic variable
  • arg2: range start year
  • arg3: range end year
ROR

Calculates the rate of return of a periodic variable.

  • arg1: periodic variable
SCALARTOPERIODIC

Assigns a scalar value to the specified date.

  • arg1: scalar value
  • arg2: year
  • arg3: month
SCALARTOPERIODICBYOFFSET

Assigns a scalar value to the start date plus an offset (number of periods).

  • arg1: scalar value
  • arg2: offset
TOTAL

Calculates the total value of a periodic variable.

  • arg1: periodic variable
VALUEBYOFFSET

Gets the periodic values of the given periodic variable by the given offset.

  • arg1: periodic variable
  • arg2: offset value
VALUEBYUNSHIFT

Gets the un-shifted values of the given periodic variable.

  • arg1: periodic variable
VARIABLESHIFTBYDIFF

Returns a periodic variable with the adjustments accounting for the difference between arg2 and arg3.

  • arg1: periodic variable to be shifted
  • arg2: an expression that can be resolved to a date
  • arg3: an expression that can be resolved to a date
  • arg4: [optional] If 1 the days in a month will not be treated as equal. If 0 or missing all months are treated as 30.41 days.